<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>demo</title>
    <script src="https://unpkg.com/vue@3.0.5/dist/vue.global.js"></script>
  </head>
  <body>
    <div id="app"></div>
    <script>
      Vue.createApp({
        data() {
          return {
            content: "",
            isShow: false,
          };
        },
        methods: {
          comeClick() {
            this.content = "欢迎光临！";
          },
          byeClick() {
            this.content = "欢迎下次光顾！";
          },
          showHidetc() {
            this.isShow = !this.isShow;
          },
        },
        mounted() {},
        template: `
          <div>
            <div>{{content}}</div>
            <button v-on:click='comeClick'>有顾客来</button>
            <button v-on:click='byeClick'>顾客离开</button>
            <div>
              <div v-if='isShow'>各种套餐介绍</div>
              <button v-on:click='showHidetc'>显示/隐藏套餐</button>
            </div>
          </div>
        `,
      }).mount("#app");
      // v-if v-on:click
    </script>
  </body>
</html>
